%EffectiveLength.m
%
%Rico Rojas
%This function integrates the population-averaged elongation rate of cells
%to find the effective population averaged length, i.e., the length that a
%cell would have if it had an initial length of 3 um and grew with the
%population-averaged elongation rate.

%INPUTS: 
%t:time vector
%v:population-averaged elongation rate
%varargin: standard deviation of elongation rate

%OUTPUTS:
%l: effective population-averaged length
%varargout: lower and upper confidence intervals

function [l]=EffectiveLengthNoSTD(t,v)

dt=diff(t);
meanV=(v(1:end-1)+v(2:end))/2;

l=zeros(size(v));
l0=1;
l(1)=l0;

for i=2:length(l)
    l(i)=l(i-1)+l(i-1)*meanV(i-1)*dt(i-1);
end




